home *** CD-ROM | disk | FTP | other *** search
- PXFISCHR(3F) Last changed: 1-22-99
-
-
- NNAAMMEE
- PPXXFFIISSCCHHRR - Tests for character special file
-
- SSYYNNOOPPSSIISS
- LLOOGGIICCAALL FFUUNNCCTTIIOONN PPXXFFIISSCCHHRR((_m))
- IINNTTEEGGEERR _m
-
- IIMMPPLLEEMMEENNTTAATTIIOONN
- UNICOS, UNICOS/mk, and IRIX systems
-
- SSTTAANNDDAARRDDSS
- IEEE standard interface for FORTRAN 77
-
- DDEESSCCRRIIPPTTIIOONN
- On IRIX systems, this routine is in lliibbffoorrttrraann..ssoo which is linked by
- default when compiling programs with the MIPSpro 7 Fortran 90 compiler
- or when compiling programs with the --ccrraayylliibbss option to the MIPSpro
- F77 compiler.
-
- The logical function PPXXFFIISSCCHHRR checks if a file is a character special
- file. The argument _m should be supplied by the sstt__mmooddee component of
- the ssttaatt structure used by the PPXXFFSSTTAATT(3F) routine.
-
- When using the CF90 compiler or MIPSpro 7 Fortran 90 compiler on
- UNICOS, UNICOS/mk, or IRIX, all arguments must be of default kind
- unless documented otherwise. On UNICOS and UNICOS/mk, default kind is
- KKIINNDD==88 for integer, real, complex, and logical arguments; on IRIX, the
- default kind is KKIINNDD==44.
-
- The following is a valid argument for this routine:
-
- _m An integer input variable containing the file mode.
-
- If the file is a character special file, PPXXFFIISSCCHHRR returns a logical
- true, otherwise a logical false is returned.
-
- EEXXAAMMPPLLEESS
- In this example, PPXXFFSSTTAATT is called on //ddeevv//ttttyy, which should be a
- character special file. After PPXXFFIINNTTGGEETT(3F) returns the mode of
- //ddeevv//ttttyy, PPXXFFIISSCCHHRR is called to check the mode of //ddeevv//ttttyy.
-
- program pxftest
- integer jstat,ierror,mode
- logical pxfischr
-
- CALL PXFSTRUCTCREATE('stat',jstat,ierror)
- CALL PXFSTAT('/dev/tty',0,jstat,ierror)
- CALL PXFINTGET(jstat,'st_mode', mode, ierror)
- if (PXFISCHR(mode) .eqv. .TRUE.) then
- print *,'/dev/tty is a character special file.'
- else
- print *,'/dev/tty should be a character special file, but is not.'
- endif
- end
-
- This program may display:
-
- /dev/tty is a character special file.
-
- SSEEEE AALLSSOO
- PPXXFFIISSBBLLKK, PPXXFFIINNTTGGEETT(3F), PPXXFFSSTTAATT(3F), PPXXFFSSTTRRUUCCTTCCRREEAATTEE(3F)
-
- _A_p_p_l_i_c_a_t_i_o_n _P_r_o_g_r_a_m_m_e_r'_s _L_i_b_r_a_r_y _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l for the printed
- version of this man page.
-